<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page contentType="text/html; charset=utf-8"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<jsp:include page="../common/bootstrap.jsp"></jsp:include>
<link rel="stylesheet" href="${pageContext.request.contextPath }/resources/jslib/jquery-easyui-1.4.3/themes/default/easyui.css">
<script type="text/javascript" src="${pageContext.request.contextPath }/resources/jslib/jquery-easyui-1.4.3/jquery.easyui.min.js"></script>
<script src="${pageContext.request.contextPath }/resources/js/sys/powerList.js"></script>
<title>权限列表</title>
</head>
<body>
	<jsp:include page="../common/header.jsp">
		<jsp:param name="module" value="admin" />
		<jsp:param name="title" value="权限列表" />
	</jsp:include>
	<div class="main">
		<table id="powerTable" class="easyui-treegrid" style="width:700px;height:400px"  
        	data-options="url:'http://localhost:8080/AboutMe/admin/powerList',idField:'powerId',treeField:'powerName',toolbar:'#toolbar'">   
    		<thead>   
        		<tr>   
            	<th data-options="field:'powerName',width:180">权限名称</th> 
            	<th data-options="field:'powerId',width:120">权限Id</th> 
            	<th data-options="field:'powerExp',width:180">权限表达式</th> 
            	<th data-options="field:'powerPId',width:120">权限父Id</th>  
        		</tr>   
    		</thead>   
		</table>  
	</div>
	
	<div id="toolbar">
		<div class="btn btn-primary" onClick="add()">新增权限</div>
		<div class="btn btn-primary" onClick="edit()">修改权限</div>
    	<div class="btn btn-primary" onClick="del()">删除</div>
   	</div>
   <div class="modal fade" id="powerModal" tabindex="-1" role="dialog" aria-labelledby="powerModalLabel">
		<div class="modal-dialog" role="document">
    		<div class="modal-content">
      			<div class="modal-header">
        			<button type="button" class="close" data-dismiss="modal" aria-label="Close">
        				<span aria-hidden="true">&times;</span>
        			</button>
        			<h4 class="modal-title" id="powerModalLabel">权限对话框</h4>
      			</div>
      			<div class="modal-body">
        			<form id="powerForm">
        				<input type="hidden" id="powerId" name="powerId">
          				<div class="form-group">
            				<label for="powerName" class="control-label">权限名称:</label>
            				<input id="powerName" name="powerName" type="text" class="form-control">
          				</div>
          				<div class="form-group">
            				<label for="powerExp" class="control-label">权限表达式:</label>
            				<input id="powerExp" name="powerExp" type="text" class="form-control">
          				</div>
          				<div class="form-group">
            				<label for="powerPId" class="control-label">权限父ID:</label>
            				<input id="powerPId" name="powerPId" type="text" class="form-control">
          				</div>
        			</form>
      			</div>
      			<div class="modal-footer">
        			<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        			<button id="addSave" type="submit" class="btn btn-primary" onClick="save(true)">保存</button>
     				<button id="editSave" type="submit" class="btn btn-primary" onClick="save(false)">保存</button>
     			</div>
    		</div>
  		</div>
	</div>
	<jsp:include page="../common/footer.jsp"></jsp:include>
</body>
</html>
